﻿@{;
    ViewBag.Title = "表单页面";
    Layout = "~/Views/Shared/_Form.cshtml";
}
<script>
    var keyValue = request('keyValue');
    $(function () {
        initControl();
    });
    //初始化控件
    function initControl() {
        //获取表单
        if (!!keyValue) {
            $.SetForm({
                url: "../../CustomerManage/Config/GetFormJson",
                param: { keyValue: keyValue },
                success: function(data) {
                    $("#form1").SetWebControls(data);
                }
            });
        }
    }
    //保存表单;
    function AcceptClick() {
        if (!$('#form1').Validform()) {
            return false;
        }
        var postData = $("#form1").GetWebControls(keyValue);
        $.SaveForm({
            url: "../../CustomerManage/Config/SaveForm?keyValue=" + keyValue,
            param: postData,
            loading: "正在保存数据...",
            success: function() {
                $.currentIframe().$("#gridTable").trigger("reloadGrid");
            }
        });
    }
</script>
<div style="margin-top: 20px; margin-right: 30px;">
    <table class="form">
        <tr>
            <td class="formTitle">名称</td>
            <td class="formValue">
                <input id="Name" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
            </td>
        </tr>
        <tr>
            <td class="formTitle">AppKey</td>
            <td class="formValue">
                <input id="Key" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
            </td>
        </tr>
        <tr>
            <td class="formTitle">AppSecret</td>
            <td class="formValue">
                <input id="Secret" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
            </td>
        </tr>
        @*<tr>
            <td class="formTitle">类型</td>
            <td class="formValue">
                <input id="Type" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
            </td>
        </tr>*@
       
    </table>
</div>
